package com.miles.pushups;

import android.app.Activity;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.widget.TextView;

public class Week6Day3 extends Activity {
	private int level = 0;
	TextView set1;
	TextView set2;
	TextView set3;
	TextView set4;
	TextView set5;
	TextView set6;
	TextView set7;
	TextView set8;
	TextView maxset;
	@Override
    public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.info2);
	    SharedPreferences mySharedPreferences = getSharedPreferences("MY_PREFS",Activity.MODE_PRIVATE);	    	    
	    level = mySharedPreferences.getInt("level", 0);
	    set1 = (TextView)findViewById(R.id.set1);
	    set2 = (TextView)findViewById(R.id.set2);
	    set3 = (TextView)findViewById(R.id.set3);
	    set4 = (TextView)findViewById(R.id.set4);
	    set5 = (TextView)findViewById(R.id.set5);
	    set6 = (TextView)findViewById(R.id.set6);
	    set7 = (TextView)findViewById(R.id.set7);
	    set8 = (TextView)findViewById(R.id.set8);
	    maxset = (TextView)findViewById(R.id.maxset);
	    switch (level){
	    case (0):
		    set1.setText("set 1  -- 13");
		    set2.setText("set 2  -- 13");
		    set3.setText("set 3  -- 17");
		    set4.setText("set 4  -- 17");
		    set5.setText("set 5  -- 16");
		    set6.setText("set 6  -- 16");
		    set7.setText("set 7  -- 14");
		    set8.setText("set 8  -- 14");
		    maxset.setText("Max   -- 50");
		    break;
	    case (1):
		    set1.setText("set 1  -- 13");
		    set2.setText("set 2  -- 13");
		    set3.setText("set 3  -- 17");
		    set4.setText("set 4  -- 17");
		    set5.setText("set 5  -- 16");
		    set6.setText("set 6  -- 16");
		    set7.setText("set 7  -- 14");
		    set8.setText("set 8  -- 14");
		    maxset.setText("Max   -- 50");
	    	break;
	    case (2):
		    set1.setText("set 1  -- 13");
		    set2.setText("set 2  -- 13");
		    set3.setText("set 3  -- 17");
		    set4.setText("set 4  -- 17");
		    set5.setText("set 5  -- 16");
		    set6.setText("set 6  -- 16");
		    set7.setText("set 7  -- 14");
		    set8.setText("set 8  -- 14");
		    maxset.setText("Max   -- 50");
	    	break;
	    }
	}
}
